package com.zheng.oss.dao.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.zheng.common.base.BaseEntity;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author likun
 * @since 2018-05-09
 */
@TableName("oss_file")
public class OssFile extends BaseEntity {
    public static final int FOLDER_TYPE = 0;
    public static final int FILE_TYPE = 1;

    public static final int NORMAL_STATUS = 0;
    public static final int DELETE_STATUS = 1;
    private static final long serialVersionUID = 1L;

    private Integer id;
    /**
     * 指向的文件id
     */
    @TableField("file_stack_id")
    private Integer fileStackId;
    private Integer pid;
    private String path;
    /**
     * 文件类型（0：目录；1：文件）
     */
    @TableField("file_type")
    private Integer fileType;
    /**
     * 文件名
     */
    private String filename;
    /**
     * 备注
     */
    private String remarks;
    private Integer status;
    @TableField(exist = false)
    private Integer permission;
    @TableField(exist = false)
    private List<Integer> roleIds;
    @Override
    protected Serializable pkVal() {
        return id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFileStackId() {
        return fileStackId;
    }

    public void setFileStackId(Integer fileStackId) {
        this.fileStackId = fileStackId;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getFileType() {
        return fileType;
    }

    public void setFileType(Integer fileType) {
        this.fileType = fileType;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getPermission() {
        return permission;
    }

    public void setPermission(Integer permission) {
        this.permission = permission;
    }

    public List<Integer> getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(List<Integer> roleIds) {
        this.roleIds = roleIds;
    }

    @Override
    public String toString() {
        return "OssFile{" +
                "id=" + id +
                ", fileStackId=" + fileStackId +
                ", pid=" + pid +
                ", path=" + path +
                ", fileType=" + fileType +
                ", filename=" + filename +
                ", cuser=" + cuser +
                ", ctime=" + ctime +
                ", corganization=" + corganization +
                ", remarks=" + remarks +
                "}";
    }
}
